package com.dubbo.nacos;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.PropertySource;

import java.io.IOException;

@EnableDubbo(scanBasePackages = "com.dubbo.nacos.service")
@PropertySource(value = "classpath:/config/provider.properties")
public class ProviderDemoApplication {

    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        // 注册 @Configuration Class
        context.register(ProviderDemoApplication.class);
        // 启动当前上下文
        context.refresh();

        System.out.println("服务提供者已启动...");
        System.in.read();
    }

}
